{% extends "base.html" %}

{% block body -%}
<div id="header">
    <div id="logo"><a href="/"><img src="{{ url_for('static', filename='images/lmfdb-logo.png') }}" /></a></div>
    <div class="right">
      <div class="bread">
        {% if bread %}
          <a href="/">Top</a>
          {% for b in bread -%}
            &rarr; <a href="{{ b[1] }}">{{ b[0]|striptags }}</a>
          {%- endfor %}
         {% endif %}
      </div>
      <div class="topright">
          <form method="GET" action="{{ url_for('search') }}" id="search-topright">
            <input type="text" placeholder="search ..." name="q" size="13" />
          </form>
            &middot;
          <a href="{{ feedbackpage }}" target="_blank">
             Feedback</a>
            &middot;
          {% if user_is_admin -%}
            <a href="{{ url_for('users.register') }}">Registertokens</a>
            &middot;
          {% endif %}
          {% if user_is_authenticated -%}
            <a href="{{ url_for('users.info') }}">{{ username }}</a> 
            &middot;
            <a href="{{ url_for('users.logout') }}">Logout</a>
          {%- else -%}
            {# <a href="{{ url_for('users.register_new') }}">Register</a>
            &middot; #}
            <a href="{{ url_for('users.info') }}">Login</a>
          {%- endif %}
          <br/>
          <span id="communication-wrapper">
            <img id="communication-img" src="{{ url_for('static', filename='images/progress-green.gif') }}" />
            <span id="communication"></span>
          </span>
      </div>
      {% if navi is defined -%}
        <div id="navi">
         {% for txt, u in navi -%}
          <a href="{{ u }}">{{ txt|safe }}</a>
          {% if not loop.last -%}&middot;{%- endif %}
         {%- endfor %}
        </div>
      {%- elif navi_raw is defined -%}
        <div id="navi">{{ navi_raw|safe }}</div>
      {%- endif %} 
      {# this span inside a div thing is necessary to align it at the bottom, see css #}
      <div id="title"><span id="title-content">{{ title|safe }}</span></div>
    </div>
</div>

{% block sidebar -%} 
 {% macro entry(title, entries) -%}
   {% if entries %}
    <h2>{{ title }}</h2>
    <ul class="subnav">
        {% for text,url in entries %}
           <li><a href="{{ url }}">{{ text }}</a></li>
        {% endfor %}
    </ul>
   {% endif %}
 {%- endmacro %}


<div id="sidebar">
  <h2 class="link">
   <a href="{{ url_for('introduction') }}">Introduction</a>
  </h2>
  <ul class="list">
    <li class="intro" style="padding-left: 0;">
     <span>
        <a href="{{url_for('introduction_features')}}">Features</a>
        <a href="{{url_for('introduction_tutorial')}}">Tutorial</a>
     </span>
   </li>
  </ul><ul>
   <li class="bigpicture">
    <a href="{{ url_for('bigpicture') }}">Map of LMFDB</a>
   </li>
   <li class="roadmap">
    <a href="{{ url_for('roadmap') }}">Future Plans</a>
   </li>
  </ul>

  <h2 class="link">
   <a href="{{ url_for('render_Lfunction') }}">L-functions</a>
  </h2>
  <ul class="list">
   <li>
    Degree:
    {% if user_is_authenticated and (username == 'MichaelRubinstein' or username == 'Jonathan Bober' or username == 'Ralph Furmaniak' or username == 'Harald Schilly') %}
      <span id="span1" style="position:relative;display:none">
      <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree1')}}"><img src="/static/images/1dot.svg"/></a>
      <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree2')}}"><img src="/static/images/2dot.svg"/></a>
      <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree3')}}"><img src="/static/images/3dot.svg"/></a>
      <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree4')}}"><img src="/static/images/4dot.svg"/></a>
      </span>
      <script>
        if(Math.random()<0.02) {
        $().ready(function() {
	  $('#span2').hide();
	  $('#span1').show();
	  setTimeout(function() {
	    $('#span1').hide();
	    $('#span2').show();
	  }, 1000);
	});
	}
      </script>
    {% endif %}
    <span id="span2">
    <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree1')}}">1</a>
    <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree2')}}">2</a>
    <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree3')}}">3</a>
    <a class="lfunction"  href="{{url_for('render_Lfunction', arg1 = 'degree4')}}">4</a>
    </span>
   </li>
  </ul>

  <h2>Elliptic Curves</h2>
  <ul>
   <li><a href="{{ url_for('EC_toplevel') }}  ">Elliptic Curves/\(\Q\)</a>
  </ul>

  <h2> Fields</h2>
    <ul>
      <li><a class = "number_fields" href="{{ url_for('number_fields.number_field_render_webpage') }}">Global Number Fields</a></li>
      <li><a href="{{ url_for('local_fields.index') }}">Local Number Fields</a></li>
      <li><a href="{{ url_for('galois_groups.index') }}">Galois Groups</a></li>
      {#  Please keep the commented part, I might reinstate some of it POD
      #<li><a class = "number_field_galois_groups" href="{{ url_for('number_field_galois_groups.index') }}">Galois Groups (only logged in)</a></li>
      #}
    </ul>

  <h2>Characters</h2>
  <ul>
   <li><a href="{{ url_for('render_Character') }} ">Dirichlet Characters</a></li>
  </ul>

  <h2 class="link">
       <a class="mf"    href="{{ url_for('mf.modular_form_main_page') }}">Modular Forms</a>
  </h2>
  <ul>
   <li><a class="emf"  href="{{ url_for('emf.render_elliptic_modular_forms') }}">Classical, $\GL(2)/\Q$</a></li>
   <li><a class="mwf"  href="{{ url_for('mwf.render_maass_waveforms') }}">Maass, $\GL(2)/\Q$</a></li>
   <li><a              href="{{ url_for('hilbert_modular_form_render_webpage') }}">Hilbert</a></li>
   <li><a              href="{{ url_for('ModularForm_GSp4_Q_top_level') }}">Siegel</a> </li>
  </ul>
   {# <li><a href="{{ url_for('quadratic_twists') }}">Quadratic Twists</a></li> #}
{#
  <h2 class="link">
       <a class="mf"    href="{{ url_for('mf.modular_form_main_page') }}">Maass Forms</a></h2>
  <ul>
   <li><a class="mwfp" href="{{ url_for('mwfp.render_picard_maass_forms') }}">for \(\PSL(2,\Z[i])\)</a></li>
  </ul>
#}
	
	<h2 class="link">
	    <a class="artin_representations" href="{{ url_for('artin_representations.index') }}">Artin Representations</a>
	</h2>
    
  


  <h2>Zeros of L-functions</h2>
   <ul>
    <li><a href="{{ url_for('first L-function zeros.firstzeros') }}">First zeros</a></li>
    <li><a href="{{ url_for('zeta zeros.zetazeros') }}">Zeta zeros</a></li>
   </ul>

  <h2 class="link knowl">
     <a class="knowl" href="{{ url_for("knowledge.index") }}">Knowledge</a>
  </h2>
   {{ entry("Data", getUploadedFor(request.path, true) ) }}
  {# {% if user_is_authenticated %} {% endif %} #}

 {% if sidebar -%}
  {% for topic, content in sidebar -%}
    {{ entry(topic, content) }}
  {%- endfor %}
 {%- endif %}

</div>
{%- endblock sidebar %}

 {% macro rightnavig(title, entries) -%}
   {% if entries %}
    <h1 class="properties-header">{{ title }}</h1>
    <div class="properties-body">
    <ul>
        {% for text,url in entries %}
           <li><a href="{{ url }}">{{ text }}</a></li>
        {% endfor %}
    </ul>
  </div>
   {% endif %}
 {%- endmacro %}

{% if (properties2 or friends or downloads or learnmore) %}
      <div id="properties">
       <div id="properties-collapser">&uarr;</div>
    {% if properties2 %}
       <h1 class="properties-header">Properties</h1>
       <div class="properties-body">
       <table>
       {% for label, content in properties2 -%}
         {% if label %}
           <tr><td class="label">{{label|safe}}</td><td>
         {% else %}
           <tr><td colspan="2">
         {% endif %}
         {% if content is string  -%}
             {{ content|safe }}</td></tr>
         {%- else -%}
           {% for c in content -%}
            {% if not loop.first -%}<tr><td></td>{%- endif %}
              {{c|safe}}</td></tr>
           {%- endfor %}
         {%- endif %}
       {%- endfor %} 
      </table>
      </div>
    {% endif %}
   {{ rightnavig("Related objects", friends) }}
   {% if downloads %}
     {{ rightnavig("Downloads", downloads + getUploadedFor(request.path, false) ) }}
   {% else %}
     {{ rightnavig("Data", getUploadedFor(request.path, false) ) }}
   {% endif %}
   {{ rightnavig("Learn more about", learnmore) }}
    </div>
    {%- endif %}


<div id="main">
  {# <div id="mathjax-info">
    <img src="{{ url_for('static', filename='images/progress-green.gif') }}" />
    <br/>
    Loading website and processing LaTeX ...
    <br>
    <span id="mathjax-log"></span>
  </div> #} 
  <div id="content">
    {% with msgs = get_flashed_messages(with_categories=true) -%}
      <div id="flashes">
        {% for cat, msg in msgs -%}
          <p class="{{ cat }}">{{ msg }}</p>
        {%- endfor %}
      </div>
    {%- endwith %}
    
    {% block content -%}
    There is nothing here. This is just a template.
    {%- endblock content %}
  </div>
</div>

<div id="footer">
    {% if credit -%}
      &copy; Data computed by {{ credit|safe }}.<br />
    {%- endif %}
    
    {% if support -%}
      {{ support|safe }}<br/>
    {%- else -%}
        <h4>{{shortthanks|safe}}</h4>
<br />
    {%- endif %}
    <div>
      <a href="{{ url_for('contact') }}">Contact</a>
      &middot;
      <a href="{{ url_for('acknowledgment') }}">Acknowledgments</a>
      &middot;
      <a href="{{ url_for('edit_board') }}">Editorial and Management Boards</a>
      {# <a href="{{ 'about' }}">About</a> #}
      &middot;
      {{ current_source|safe }}
      &middot;
      {{ latest_changeset|safe }}
    </div>
</div>

{%- endblock body %}
